package com.zzyy.study.controller;

import com.zzyy.study.annotation.OperationLog;
import com.zzyy.study.config.ThreadPoolProperties;
import com.zzyy.study.entities.UserDTO;
import com.zzyy.study.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * @auther zzyy
 * @create 2024-02-17 15:54
 */
@RestController
public class UserController
{
    @Resource
    private UserService userService;

    @PostMapping("/user/add")
    @OperationLog("添加用户")// 这里可以写上操作日志的描述
    public ResponseEntity<String> addUser(@RequestBody UserDTO userDTO)
    {
        return userService.addUser(userDTO);
    }
}
